<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Initialization of the Taylor Package</title>
</head>

<body>

<h1 align="left">EXAMPLES OF INIT</h1>

<p align="left">&nbsp;</p>

<p><font size="4">The FPP package can be initialized as a pure TPSA package with no physics or 
as an accelerator physics package.</font></p>

<h3><u><b>Ordinary TPSA</b></u></h3>

<p><font color="#008080" face="Courier"><b>PROGRAM INIT_FPP<br>
USE POLYMORPHIC_COMPLEXTAYLOR<br>
TYPE(<a style="text-decoration: none" href="../h_definition.htm#TAYLOR">TAYLOR</a>) X,COSX<br>
<br>
CALL <a style="text-decoration: none" href="../n_complex_polymorph.htm#INIT">INIT</a>(NO1=2,NV1=2)<font size="4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&lt;------------------ init for pure TPSA<br>
</font><u>
<br>
CA</u>LL <a href="../i_tpsa.htm#ALLOC" style="text-decoration: none">ALLOC</a>(X,COSX)<br>
<br>
X<a href="../i_tpsa.htm#=" style="text-decoration: none">=</a>(1.D0.<a href="../i_tpsa.htm#MONO" style="text-decoration: none">MONO</a>.'1')<a href="../i_tpsa.htm#+" style="text-decoration: none">+</a>(1.D0.<a href="../i_tpsa.htm#MONO" style="text-decoration: none">MONO</a>.'01')&nbsp;&nbsp;&nbsp; 
&lt;-------------</b></font><font size="4">x<sub> </sub>= 
x<sub>1 </sub>+ x<sub>2
</sub></font><font color="#008080" face="Courier"><b><br>
<br>
COSX=<a href="../i_tpsa.htm#COS" style="text-decoration: none">COS</a>(X)<br>
<br>
CALL <a href="../j_tpsalie.htm#PRINT" style="text-decoration: none">PRINT</a>(COSX,6)<br>
<br>
CALL <a href="../i_tpsa.htm#KILL" style="text-decoration: none">KILL</a>(X,COSX)<br>
<br>
END PROGRAM INIT_FPP</b></font></p>

<p><font size="4">This programs initializes FPP&nbsp; as a package dealing with 4th degree 
polynomials in 2 variables. </font> </p>

<p><b><font face="Times New Roman">NO1 is the order of the polynomial.</font></b></p>

<p><b><font face="Times New Roman">NP1 is the number of variables or parameters.</font></b></p>

<p><b><sub><font size="5">Output</font></sub></b></p>

<p><b><font color="#FF00FF" face="Courier">&nbsp;Welcome to TPSA Overloaded<br>
<br>
Berz's Package<br>
<br>
<br>
etall 1, NO = 2, NV = 2, INA = 14<br>
*********************************************<br>
<br>
I COEFFICIENT ORDER EXPONENTS<br>
NO = 2 NV = 2<br>
0 1.000000000000000 0 0<br>
2 -0.5000000000000000 2 0<br>
2 -1.000000000000000 1 1<br>
2 -0.5000000000000000 0 2<br>
-4 0.000000000000000 0 0<br>
&nbsp;</font></b></p>

<h3><u><b>Accelator Physics TPSA/AD/Lie</b></u></h3>

<p><b><font color="#008080">PROGRAM INIT_FPP_PHASE_SPACE<br>
USE POLYMORPHIC_COMPLEXTAYLOR<br>
TYPE(<a href="../h_definition.htm#DAMAP" style="text-decoration: none">DAMAP</a>) 
MAP<br>
<br>
CALL </font></b><font color="#008080" face="Courier"><b> 
<a href="../n_complex_polymorph.htm#INIT" style="text-decoration: none">INIT</a></b></font><b><font color="#008080">(</font></b><font color="#008080" face="Courier"><b>NO1</b></font><b><font color="#008080">=2,ND1=1,NP1=0,</font><font face="Times New Roman" color="#008080">NDPT1 
=0</font><font color="#008080">)<font size="5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</font></font></b><font color="#008080" face="Courier"><b><font size="4">
&lt;------------------ init for maps in ND1 degrees of freedom</font></b></font><b><font color="#008080"><font size="5"><br>
</font><br>
CALL </font></b><font color="#008080" face="Courier"><b>
<a href="../j_tpsalie.htm#ALLOC" style="text-decoration: none">ALLOC</a></b></font><b><font color="#008080">(MAP)<br>
<br>
MAP%V(1)= (1.D0.MONO.'1') + 2.5D0*(1.D0.MONO.'01')<br>
MAP%V(2)= (1.D0.MONO.'01') <br>
<br>
<br>
CALL <a href="../j_tpsalie.htm#PRINT" style="text-decoration: none">PRINT</a>(MAP,6)<br>
<br>
CALL <a href="../j_tpsalie.htm#KILL" style="text-decoration: none">KILL</a>(MAP)<br>
<br>
END PROGRAM INIT_FPP_PHASE_SPACE</font></b></p>

<p><font size="4">The above program creates a map corresponding to a drift, 
namely:</font></p>

<p><font size="4"><span style="text-decoration: overline">x</span><sub>1 </sub>= 
x<sub>1 </sub>+ 2.5 x<sub>1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</sub><span style="text-decoration: overline">x</span><sub>2 </sub>= x<sub>2
</sub></font></p>

<p><b><font face="Times New Roman">NO1 is the order of the polynomial. ND1 is 
the number of degress of freedom: 1,2, or 3.</font></b></p>

<p><b><font face="Times New Roman">NP1 is the number of variables or parameters. 
NDPT1 locates the constant energy plane typically </font></b></p>

<p><b><sub><font size="5">Output</font></sub></b></p>

<p><b><font color="#FF00FF" face="Courier">&nbsp;Welcome to TPSA Overloaded<br>
<br>
Berz's Package<br>
<br>
NO ND ND2 NP NDPT NV<br>
2 1 2 0 0 2<br>
<br>
ETALL 1, NO = 2, NV = 2, INA = 13<br>
*********************************************<br>
<br>
I COEFFICIENT ORDER EXPONENTS<br>
NO = 2 NV = 2<br>
1 1.000000000000000 1 0<br>
1 2.500000000000000 0 1<br>
-2 0.000000000000000 0 0<br>
<br>
ETALL 2, NO = 2, NV = 2, INA = 14<br>
*********************************************<br>
<br>
I COEFFICIENT ORDER EXPONENTS<br>
NO = 2 NV = 2<br>
1 1.000000000000000 0 1<br>
-1 0.000000000000000 0 0<br>
&nbsp;</font></b></p>

<p><br>
<br>
<br>
&nbsp;</p>

</body>

</html>